{#if error} @{data.username}'s profile could not be loaded. {:else}
{#if userData === null} Could not load user profile for @{data.username}.

Does this user exist? {:else if userData === undefined} {:else}

{#if userData} {/if}

@{userData.name} {#if userData && authorisedUsers.includes(userData.id)} ‌ {/if} Badge Wall

{$locale({ values: { username: data.username, anime: (userData.statistics.anime.minutesWatched / 60 / 24).toFixed(1), manga: estimatedDayReading(userData.statistics.manga.chaptersRead).toFixed(1) } }).user.profile.statistics}

{#await fetch(root(`/api/badges?id=${userData.id}`))} {displayBadges(userData.name, '...')} {:then badges} {#await badges.json()} {displayBadges(userData.name, '...')} {:then badges} {displayBadges(userData.name, badges.length)} {:catch} {displayBadges(userData.name, '?')} {/await} {:catch} {displayBadges(userData.name, '?')} {/await}

{/if}
{/if}